package com.culturalCenter.dataCenter.service.impl.user;

import com.culturalCenter.dataCenter.entity.user.UserActivitySignUpContentType;
import com.culturalCenter.dataCenter.mapper.user.UserActivitySignUpContentTypeMapper;
import com.culturalCenter.dataCenter.service.user.UserActivitySignUpContentTypeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/****
 * @Author:
 * @Description:UserActivitySignUpContentType业务层接口实现类
 * @Date
 *****/
@Service
public class UserActivitySignUpContentTypeServiceImpl implements UserActivitySignUpContentTypeService {

    @Resource
    private UserActivitySignUpContentTypeMapper userActivitySignUpContentTypeMapper;

    @Override
    public PageInfo<UserActivitySignUpContentType> findPage(int page, int size) {
        return PageHelper.startPage(page, size).doSelectPageInfo(() -> userActivitySignUpContentTypeMapper.findPageAll());
    }

    @Override
    public Integer delete(String id) {
        return userActivitySignUpContentTypeMapper.deleteById(id);
    }

    @Override
    public Integer update(UserActivitySignUpContentType userActivitySignUpContentType) {
        return userActivitySignUpContentTypeMapper.update(userActivitySignUpContentType);
    }

    @Override
    public Integer add(UserActivitySignUpContentType userActivitySignUpContentType) {
        return userActivitySignUpContentTypeMapper.insert(userActivitySignUpContentType);
    }

    @Override
    public UserActivitySignUpContentType findById(String id) {
        return userActivitySignUpContentTypeMapper.queryById(id);
    }

    @Override
    public List<UserActivitySignUpContentType> findAll(UserActivitySignUpContentType userActivitySignUpContentType) {
        return (List<UserActivitySignUpContentType>) userActivitySignUpContentTypeMapper.queryAll(userActivitySignUpContentType);
    }

}
